3.72 \(\int \frac{\sqrt{1+x^2}}{-1+x^2} \, dx\)

Optimal. Leaf size=27 \[ \sinh ^{-1}(x)-\sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{2} x}{\sqrt{x^2+1}}\right ) \]

[Out]

ArcSinh[x] - Sqrt[2]*ArcTanh[(Sqrt[2]*x)/Sqrt[1 + x^2]]

________________________________________________________________________________________

Rubi [A]  time = 0.0139642, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {402, 215, 377, 207} \[ \sinh ^{-1}(x)-\sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{2} x}{\sqrt{x^2+1}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 + x^2]/(-1 + x^2),x]

[Out]

ArcSinh[x] - Sqrt[2]*ArcTanh[(Sqrt[2]*x)/Sqrt[1 + x^2]]

Rule 402

Int[((a_) + (b_.)*(x_)^2)^(p_.)/((c_) + (d_.)*(x_)^2), x_Symbol] :> Dist[b/d, Int[(a + b*x^2)^(p - 1), x], x]
- Dist[(b*c - a*d)/d, Int[(a + b*x^2)^(p - 1)/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d,
0] && GtQ[p, 0] && (EqQ[p, 1/2] || EqQ[Denominator[p], 4])

Rule 215

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[(Rt[b, 2]*x)/Sqrt[a]]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\sqrt{1+x^2}}{-1+x^2} \, dx &=2 \int \frac{1}{\left (-1+x^2\right ) \sqrt{1+x^2}} \, dx+\int \frac{1}{\sqrt{1+x^2}} \, dx\\ &=\sinh ^{-1}(x)+2 \operatorname{Subst}\left (\int \frac{1}{-1+2 x^2} \, dx,x,\frac{x}{\sqrt{1+x^2}}\right )\\ &=\sinh ^{-1}(x)-\sqrt{2} \tanh ^{-1}\left (\frac{\sqrt{2} x}{\sqrt{1+x^2}}\right )\\ \end{align*}

Mathematica [B]  time = 0.0246694, size = 64, normalized size = 2.37 \[ \frac{\log \left (\sqrt{2} \sqrt{x^2+1}-x+1\right )-\log \left (\sqrt{2} \sqrt{x^2+1}+x+1\right )+\log (1-x)-\log (x+1)}{\sqrt{2}}+\sinh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[1 + x^2]/(-1 + x^2),x]

[Out]

ArcSinh[x] + (Log[1 - x] - Log[1 + x] + Log[1 - x + Sqrt[2]*Sqrt[1 + x^2]] - Log[1 + x + Sqrt[2]*Sqrt[1 + x^2]
])/Sqrt[2]

________________________________________________________________________________________

Maple [B]  time = 0.008, size = 84, normalized size = 3.1 \begin{align*} -{\frac{1}{2}\sqrt{ \left ( 1+x \right ) ^{2}-2\,x}}+{\it Arcsinh} \left ( x \right ) +{\frac{\sqrt{2}}{2}{\it Artanh} \left ({\frac{ \left ( -2\,x+2 \right ) \sqrt{2}}{4}{\frac{1}{\sqrt{ \left ( 1+x \right ) ^{2}-2\,x}}}} \right ) }+{\frac{1}{2}\sqrt{ \left ( -1+x \right ) ^{2}+2\,x}}-{\frac{\sqrt{2}}{2}{\it Artanh} \left ({\frac{ \left ( 2+2\,x \right ) \sqrt{2}}{4}{\frac{1}{\sqrt{ \left ( -1+x \right ) ^{2}+2\,x}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+1)^(1/2)/(x^2-1),x)

[Out]

-1/2*((1+x)^2-2*x)^(1/2)+arcsinh(x)+1/2*2^(1/2)*arctanh(1/4*(-2*x+2)*2^(1/2)/((1+x)^2-2*x)^(1/2))+1/2*((-1+x)^
2+2*x)^(1/2)-1/2*2^(1/2)*arctanh(1/4*(2+2*x)*2^(1/2)/((-1+x)^2+2*x)^(1/2))

________________________________________________________________________________________

Maxima [B]  time = 1.4827, size = 80, normalized size = 2.96 \begin{align*} -\frac{1}{2} \, \sqrt{2} \operatorname{arsinh}\left (\frac{2 \, x}{{\left | 2 \, x + 2 \right |}} - \frac{2}{{\left | 2 \, x + 2 \right |}}\right ) - \frac{1}{2} \, \sqrt{2} \operatorname{arsinh}\left (\frac{2 \, x}{{\left | 2 \, x - 2 \right |}} + \frac{2}{{\left | 2 \, x - 2 \right |}}\right ) + \operatorname{arsinh}\left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)^(1/2)/(x^2-1),x, algorithm="maxima")

[Out]

-1/2*sqrt(2)*arcsinh(2*x/abs(2*x + 2) - 2/abs(2*x + 2)) - 1/2*sqrt(2)*arcsinh(2*x/abs(2*x - 2) + 2/abs(2*x - 2
)) + arcsinh(x)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)^(1/2)/(x^2-1),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{x^{2} + 1}}{\left (x - 1\right ) \left (x + 1\right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+1)**(1/2)/(x**2-1),x)

[Out]

Integral(sqrt(x**2 + 1)/((x - 1)*(x + 1)), x)

________________________________________________________________________________________

Giac [B]  time = 1.19632, size = 95, normalized size = 3.52 \begin{align*} -\frac{1}{2} \, \sqrt{2} \log \left (\frac{{\left | 2 \,{\left (x - \sqrt{x^{2} + 1}\right )}^{2} - 4 \, \sqrt{2} - 6 \right |}}{{\left | 2 \,{\left (x - \sqrt{x^{2} + 1}\right )}^{2} + 4 \, \sqrt{2} - 6 \right |}}\right ) - \log \left (-x + \sqrt{x^{2} + 1}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)^(1/2)/(x^2-1),x, algorithm="giac")

[Out]

-1/2*sqrt(2)*log(abs(2*(x - sqrt(x^2 + 1))^2 - 4*sqrt(2) - 6)/abs(2*(x - sqrt(x^2 + 1))^2 + 4*sqrt(2) - 6)) -
log(-x + sqrt(x^2 + 1))